package com.chanjiedata.changbs.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chanjiedata.changbs.R;
import com.chanjiedata.changbs.proto.MemberBank;

import java.util.List;

/**
 * 文件名 : ProgressAdapter
 * 创建者 : MangoWang
 * 创建日期 : 2019/11/25 11:50
 * 微信 : MangoWaWang
 * 邮箱 : 763482205@qq.com
 * 描述 : TODO
 */

public class BankCardAdapter extends BaseQuickAdapter<MemberBank.bank,BaseViewHolder> {
    public BankCardAdapter(Context context, List<MemberBank.bank> dataList) {
        super(R.layout.item_bank_card,dataList);
    }

    @Override
    protected void convert(BaseViewHolder helper, MemberBank.bank item) {
        String bank_card = item.getBankCard();
        String substring = bank_card.substring(bank_card.length() - 4);
        helper.setText(R.id.tv_bank_name,item.getBankName())
                .setText(R.id.tv_bank_card_type,item.getBankType())
                .setText(R.id.tv_card_number,"**** **** **** " + substring);


    }
}